home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / what.zip / LIBMAIN.C_ / LIBMAIN.bin
Text File  |  1992-07-15  |  3KB  |  94 lines

  1. /*****************************************************************************
  2. *                                                                            *
  3. *  LIBMAIN.C                                     *
  4. *                                                                            *
  5. *  Copyright (C) Microsoft Corporation 1991.                     *
  6. *  All Rights reserved.                                                      *
  7. *                                                                            *
  8. ******************************************************************************
  9. *                                                                            *
  10. *  Module Description: Main entry point for sample Help DLL                  *
  11. *                                                                            *
  12. *****************************************************************************/
  13.  
  14.  
  15. #define NOMINMAX
  16. #include <windows.h>
  17. #include "dlldemo.h"
  18.  
  19. #ifndef EXPORT
  20. #define EXPORT FAR PASCAL
  21. #endif
  22. #define PRIVATE static
  23.  
  24. /*****************************************************************************
  25. *                                                                            *
  26. *                               Prototypes                                   *
  27. *                                                                            *
  28. *****************************************************************************/
  29.  
  30. BOOL EXPORT LibMain(HANDLE hModule,
  31.             WORD   wDataSeg,
  32.             WORD   cbHeap,
  33.             LPSTR  lpchCmdLine);
  34.  
  35. int EXPORT WEP( int idParam );
  36.  
  37. /***************************************************************************
  38.  *
  39.  -  Name    LibMain
  40.  -
  41.  *  Purpose    Called by system (through ewdemo.asm) when library is loaded.
  42.  *
  43.  *  Arguments    hModule     Module handle for the library
  44.  *        cbHeap        Size of local heap
  45.  *        lpchCmdLine Pointer to the command line
  46.  *
  47.  *  Returns
  48.  *
  49.  *  +++
  50.  *
  51.  *  Notes
  52.  *
  53.  ***************************************************************************/
  54.  
  55. BOOL EXPORT LibMain( HANDLE hModule,
  56.              WORD   wDataSeg,
  57.              WORD   cbHeap,
  58.              LPSTR  lpchCmdLine )
  59.   {
  60.  
  61.   if (cbHeap)
  62.     UnlockData(0);
  63.  
  64.   if (!FInitEmbeddedWindow( hModule ) )
  65.     return FALSE; /* Initialization  failed */
  66.  
  67.   if (!FInitExtendedWindow( hModule ) )
  68.     return FALSE; /* Initialization  failed */
  69.  
  70.   return TRUE;  /* if we got here everything is ok! */
  71.   }
  72.  
  73. /***************************************************************************
  74.  *
  75.  -  Name    WEP
  76.  -
  77.  *  Purpose    Termination routine called by system.
  78.  *
  79.  *  Arguments    idParam (not used)
  80.  *
  81.  *  Returns    1
  82.  *
  83.  *  +++
  84.  *
  85.  *  Notes    This is optional.
  86.  *
  87.  ***************************************************************************/
  88.  
  89. int EXPORT WEP( int idParam )
  90.   {
  91.   return 1;
  92.   }
  93.  
  94.